# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Philippe Proulx <pproulx@efficios.com>
# Contributor: Manuel Mendez <mmendez534 at gmail dot com>

pkgname=lttng-ust2.12
pkgver=2.12.8
pkgrel=1
pkgdesc='LTTng user space tracing libraries for LTTng'
arch=(loong64 x86_64)
url=https://lttng.org/
license=(
  LGPL2.1
  GPL2
  MIT
)
depends=(
  glibc
  libnuma.so
  liburcu
)
makedepends=(git)
conflicts=(lttng-ust)
_tag=63ba39774f3aa6c1fbca75a8ee8f1bab7a2ea3e6
#source=(git+https://github.com/lttng/lttng-ust.git?signed#tag=${_tag})
source=(git+https://github.com/lttng/lttng-ust.git#tag=${_tag})
b2sums=(SKIP)
validpgpkeys=(2A0B4ED915F2D3FA45F5B16217280A9781186ACF) # Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

prepare() {
  cd lttng-ust
  autoreconf -fiv
}

pkgver() {
  cd lttng-ust
  git describe --tags | sed 's/^v//'
}

build() {
  cd lttng-ust
  ./configure \
    --prefix=/usr \
    --disable-examples \
    --disable-man-pages
  make
}

package() {
  cd lttng-ust
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/lttng-ust2.12/
}

# vim: ts=2 sw=2 et:
